<!DOCTYPE html>
<html>

<head lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="description" content="58新媒体">
    <meta name="keywords" content="58新媒体"/>
    <title>58新媒体-用户管理</title>
    <link href="../images/web.ico" rel="icon">
    <link href="../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../lib/bootstrap/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="../css/style.css" rel="stylesheet">
    <link href="../css/animate.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../css/sweetalert.css">
    <link rel="stylesheet" type="text/css" href="../plugins/validator/css/bootstrap-datetimepicker.min.css" />
    <link rel="stylesheet" type="text/css" href="../lib/bootstrap/css/bootstrap-table.min.css"/>
    <!---让IE9以下浏览器支持响应式布局---->
    <!--[if lt IE 9]>
    <script src="../plugins/ie/html5shiv-3.7.0.js"></script>
    <script src="../plugins/ie/respond-1.3.0.min.js"></script>
    <![endif]-->
</head>

<body>
<!--加载--->
<div class="loading-container">
    <div class="sk-spinner sk-spinner-wave">
        <div class="sk-rect1"></div>
        <!--此注释用于消除‘display: inline-block;’布局下标签自动生成的空白边距，请勿删除
    -->
        <div class="sk-rect2"></div>
        <!--
    -->
        <div class="sk-rect3"></div>
        <!--
    -->
        <div class="sk-rect4"></div>
        <!--
    -->
        <div class="sk-rect5"></div>
    </div>
</div>
<!--导航-->
<div class="navbar navbar-inner">
    <div class="container-fluid">
        <div class="">
            <a class="navbar-header pull-left logo" href="index.html">
                58新媒体管理平台
            </a>
            <div class="sidebar-collaps" id="sidebar-collapse" style="display: inline-block">
                <i class="collapse-icon glyphicon glyphicon-align-justify"></i>
            </div>
            <ul class="nav navbar-nav navbar-right navbar-custom-menu">
                <li class="dropdown">
                    <a href="#" title="警告"><i class="fa fa-exclamation-triangle"></i></a>
                </li>
                <li class="dropdown messages-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false" title="邮件"><i class="fa fa-envelope-o"></i><span
                            class="label label-success badge-s">4</span></a>
                    <ul class="dropdown-menu">
                        <li class="header">你有4封未读邮件</li>
                        <li>
                            <div class="slimScrollDiv">
                                <ul class="menu">
                                    <li>
                                        <a href="#">
                                            <div class="pull-left"><img src="../images/head-portrait/0.jpg"
                                                                        class="img-circle"></div>
                                            <h4>五大新型Python框架！
                                                <small>两小时前</small>
                                            </h4>
                                            <p>
                                                更快、更简单，更“Python化”——这就是Python生态系统中各类新型Web框架的终极诉求。在今天的文章中，我们将介绍五款面向Python的新型Web与网络框架，它能够切实提升速度表现、充分发挥突破性新特性，同时带来实现新思路的更多可行途径。</p>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="pull-left"><img src="../images/head-portrait/4.jpg"
                                                                        class="img-circle"></div>
                                            <h4>从传统架构到云上数据
                                                <small>昨天</small>
                                            </h4>
                                            <p>
                                                从传统的架构到云上大数据，实现了很多的转变。传统的大数据平台计算和数据一般都在一起，到云上之后计算有可能是虚拟机、有可能是容器，存储和计算是分离的。任何计算节点访问存储时都是通过高速互联网络把数据迁移到本地来。</p>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="pull-left"><img src="../images/head-portrait/2.jpg"
                                                                        class="img-circle"></div>
                                            <h4>Windows常见故障
                                                <small>昨天</small>
                                            </h4>
                                            <p>
                                                任何使用Windows系统的用户都碰到过各种各样的问题，其中一些次要的问题不但会引起你的烦恼，还会给你的工作效率带来负面影响。而那些主要的问题则可能会导致你的程序崩溃，且让你需要重新启动系统。</p>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="pull-left"><img src="../images/head-portrait/3.jpg"
                                                                        class="img-circle"></div>
                                            <h4>移动应用开发从何入手？
                                                <small>昨天</small>
                                            </h4>
                                            <p>
                                                移动应用的开发方式多种多样。虽然从技术层面了解混合与原生应用间的区别非常重要，但更重要的仍然是立足业务层面思考具体决策会给开发团队及客户带来哪些影响。事实上，混合与原生之争久已有之，且双方在使用体验、技术、投资回报以及业务影响等层面皆各擅胜场。</p>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                        <li class="footer">
                            <a href="#">查看所有邮件</a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown messages-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false" title="通知"><i class="fa fa-bell-o"></i><span
                            class="label label-warning badge-s">10</span></a>
                    <ul class="dropdown-menu">
                        <li class="header">你有10条新消息</li>
                        <li>
                            <div class="slimScrollDiv">
                                <ul class="menu">
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-user-circle-o text-yellow"></i>管理员发布了新公告
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-user-o text-red"></i>您有3次登录失败的记录
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-user-o text-info"></i>Wihend刚刚成为了超级用户
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-group text-aqua"></i>新同事向您发出邀请
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-group text-green"></i>有新员工加入
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                        <li class="footer">
                            <a href="#">查看所有消息</a>
                        </li>
                    </ul>
                </li>

                <li class="dropdown messages-menu">
                    <a href="#" class="dropdown-toggle animation-info" data-toggle="dropdown" role="button"
                       aria-haspopup="true" aria-expanded="false" title="消息"><i class="fa fa-commenting"></i></a>
                    <ul class="dropdown-menu">
                        <li class="header">有2位联系人给你发来了消息</li>
                        <li>
                            <div class="slimScrollDiv">
                                <ul class="menu">
                                    <li>
                                        <a href="#">
                                            <div class="pull-left"><img src="../images/head-portrait/0.jpg"
                                                                        class="img-circle"></div>
                                            <p>Divyia</p>
                                            <h5>在线
                                                <small>1小时前</small>
                                            </h5>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="pull-left"><img src="../images/head-portrait/4.jpg"
                                                                        class="img-circle"></div>
                                            <p>Johnson</p>
                                            <h5>在线
                                                <small>3小时前</small>
                                            </h5>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                    </ul>
                </li>
                <li class="dropdown messages-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false"><img src="../images/head-portrait/3.jpg" class="user-img"><span
                            class="hedden-xs"> 欢迎您，Admin</span></a>
                    <ul class="dropdown-menu user-box">
                        <li class="user-header">
                            <img src="../images/head-portrait/3.jpg" class="img-circle" height="90">
                            <!--<p>WenQian-Web前端开发者<small>2014/04-至今</small></p>-->
                        </li>
                        <li class="user-footer">
                            <div class="pull-right">
                                <a class="btn btn-default" id="sign-out">退出</a>
                            </div>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</div>

<!--主体-->
<div class="main-container container-fluid">
    <div class="page-container" style="">
        <div class="page-sidebar">
            <div class="sidebar-header-wrapper">
                <div class="form-group has-group has-transparent">
                    <input type="text" class="form-control searchinput">
                    <div class="searchhelper">搜索报告、图表、电子邮件或通知</div>
                    <span class="fa fa-search has-group-feedback"></span>
                </div>
            </div>
            <ul class="nav sidebar-menu">
                <!--首页-->
                <li class="">
                    <a href="index.html">
                        <i class="glyphicon glyphicon-home menu-icon"></i>
                        <span class="menu-text"> 首页 </span>
                    </a>
                </li>
                <li class="active">
                    <a href="member.html">
                        <i class="glyphicon menu-icon fa fa-user-circle"></i>
                        <span class="menu-text"> 用户管理 </span>
                    </a>
                </li>
                <li>
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-newspaper-o"></i>
                        <span class="menu-text"> 新闻中心 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="news-classification.html">
                                <span class="menu-text">新闻分类</span>
                            </a>
                        </li>
                        <li>
                            <a href="news.html">
                                <span class="menu-text">新闻中心</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="">
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-video-camera"></i>
                        <span class="menu-text"> 视频中心 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li class="">
                            <a href="video-classification.html">
                                <span class="menu-text">视频分类</span>
                            </a>
                        </li>
                        <li class="">
                            <a href="video.html">
                                <span class="menu-text">视频中心</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-shopping-cart"></i>
                        <span class="menu-text"> 商品中心 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="shop-classification.html">
                                <span class="menu-text">商品分类</span>
                            </a>
                        </li>
                        <li>
                            <a href="shop.html">
                                <span class="menu-text">商品列表</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="forward.html">
                        <i class="glyphicon menu-icon fa fa-file-text-o"></i>
                        <span class="menu-text"> 提现打款 </span>
                    </a>
                </li>
                <li class="">
                    <a href="transfer.html">
                        <i class="glyphicon menu-icon fa fa-file-text-o"></i>
                        <span class="menu-text"> 转账 </span>
                    </a>
                </li>
                <li>
                    <a href="order.html">
                        <i class="glyphicon menu-icon fa fa-server menu-icon"></i>
                        <span class="menu-text"> 订单管理 </span>
                    </a>
                </li>
                <li>
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-calendar-minus-o"></i>
                        <span class="menu-text"> 任务管理 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="taskType.html">
                                <span class="menu-text">任务类型</span>
                            </a>
                        </li>
                        <li>
                            <a href="taskScreenshots.html">
                                <span class="menu-text">任务截图</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="">
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-window-restore"></i>
                        <span class="menu-text"> 套餐 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li class="">
                            <a href="taskType.html">
                                <span class="menu-text">套餐列表</span>
                            </a>
                        </li>
                        <li class="">
                            <a href="meal-detailed.html">
                                <span class="menu-text">套餐明细</span>
                            </a>
                        </li>
                        <li class="">
                            <a href="meal-run.html">
                                <span class="menu-text">套餐管理</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="signIn.html">
                        <i class="glyphicon menu-icon fa fa-map-marker"></i>
                        <span class="menu-text"> 签到明细 </span>
                    </a>
                </li>
                <li>
                    <a href="read.html">
                        <i class="glyphicon menu-icon fa fa-book"></i>
                        <span class="menu-text"> 阅读赚钱明细 </span>
                    </a>
                </li>
                <li>
                    <a href="distribution-commission.html">
                        <i class="glyphicon menu-icon fa fa-mail-forward"></i>
                        <span class="menu-text"> 分销佣金明细 </span>
                    </a>
                </li>
                <li class="">
                    <a href="InvitationToEarn.html">
                        <i class="glyphicon menu-icon fa fa-id-badge"></i>
                        <span class="menu-text"> 邀请赚取 </span>
                    </a>
                </li>
                <li class="">
                    <a href="notice.html">
                        <i class="glyphicon menu-icon fa fa-bullhorn menu-icon"></i>
                        <span class="menu-text"> 系统公告 </span>
                    </a>
                </li>
                <li class="">
                    <a href="store-detailed.html">
                        <i class="glyphicon menu-icon fa fa-mail-forward"></i>
                        <span class="menu-text"> 商城分销明细 </span>
                    </a>
                </li>
                <!--<li class="">
                    <a href="quotaDetails.html">
                        <i class="glyphicon menu-icon fa fa-sort-amount-desc"></i>
                        <span class="menu-text"> 额度明细 </span>
                    </a>
                </li>-->
            </ul>
        </div>

        <!---page-sidebar--->

        <div class="page-wrapper">
            <div class="page-breadcrumbs">
                <ol class="breadcrumb">
                    <li><i class="fa fa-home"></i>
                        <a href="index.html">首页</a>
                    </li>
                    <li>用户管理</li>
                </ol>
            </div>
            <div class="page-header position-relative">
                <div class="header-title title-h1">用户管理</div>
            </div>

            <div class="panel-body" style="padding-bottom:0px;">
                <div class="panel panel-default">
                    <div class="panel-heading">用户管理</div>
                    <div class="panel-body">
                        <form id="formSearch" class="form-horizontal">
                            <div class="form-group" style="margin-top:15px">
                                <label class="control-label col-sm-1" for="userName">用户昵称</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" name="userName" id="userName">
                                </div>
                                <div class="col-sm-4" style="text-align:left;">
                                    <button type="button" style="margin-left:50px" id="btn_query"
                                            onclick="queryHandle()"
                                            class="btn btn-primary">查询
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div id="toolbar" class="btn-group">
                    <button id="btn_edits" type="button" class="btn btn-default" onclick="update()">
                        <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>查看用户信息
                    </button>
                    <button id="btn_delete1" type="button" onclick="deliverGoods()" class="btn btn-default">
                        <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>充值余额
                    </button>
                    <button id="btn_edit" type="button" class="btn btn-default">
                            <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>充值明细
                    </button>
                    <button id="user-member" type="button" class="btn btn-default" onclick="member()">
                        <span class="fa fa-viacoin" aria-hidden="true"></span>添加套餐
                    </button>
                </div>
                <table id="tb_departments"></table>
            </div>

        </div>
        <!--page-wrapper--->

    </div>
</div>

<!-- 修改资金池金额--模态框（Modal） -->
<div class="modal fade" id="deliveryStatus-myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="">
                    充值余额
                </h4>
            </div>
            <div class="modal-body">
                <form id="" method="post" class="form-horizontal" action="">
                    <div class="form-group">
                        <label for="" class="col-md-3 control-label">充值方式<i class="red">*</i></label>
                        <div class="input-group col-md-5" style="padding-left: 15px;">
                            <input type="radio" name="sex" value="add" checked id="plus">增加
                            <input type="radio" name="sex" value="reduce" id="reduce">减少
                            <!--<span style="color: red">(负数请加"-"符号)</span>-->
                        </div>
                        <label for="" class="col-md-3 control-label">充值余额<i class="red">*</i></label>
                        <div class="input-group col-md-5" style="padding-left: 15px;">
                            <input class="form-control" onkeyup="this.value=this.value.replace(/[^\d^]/,'')" id="commission" type="text" value="" name="number" />
                            <!--<span style="color: red">(负数请加"-"符号)</span>-->
                        </div>
                        <!--<label for="" class="col-md-3 control-label">平台是否已收款<i class="red">*</i></label>-->
                        <!--<div class="input-group col-md-5" style="padding-left: 15px;">-->
                            <!--<select class="form-control" id="isPay" name="isPay">-->
                                <!--<option value="">选择收款状态</option>-->
                                <!--<option value="是">已收款</option>-->
                                <!--<option value="否">未收款</option>-->
                            <!--</select>-->
                        <!--</div>-->
                        <input type="hidden" id="deliveryStatus-id" value="" /><br/>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="deliveryStatus-submit" data-loading-text="加载中...">确认充值</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>




<!-- 会员--模态框（Modal） -->
<div class="modal fade" id="member-myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabe2" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myModalLabe2">
                    套餐设置
                </h4>
            </div>
            <div class="modal-body">
                <form id="" method="post" class="form-horizontal" action="">
                    <!--<div class="form-group">
                        <label class="col-lg-4 control-label">开始<i class="red">*</i></label>
                        <div class="col-lg-5">
                            <input type="text" class="form-control"  name="" id="startDate" value=""  />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-4 control-label">结束<i class="red">*</i></label>
                        <div class="col-lg-5">
                            <input type="text" class="form-control"  name="" id="expirationDate" value="" />
                        </div>
                    </div>-->
                    <div class="form-group">
                        <label  class="col-md-3 control-label">套餐数量<i class="red">*</i></label>
                        <div class="input-group col-md-5" style="padding-left: 15px;">
                            <input class="form-control"  id="financingNumber" oninput = "value=value.replace(/[^\d]/g,'')" type="number" value=""  name="financingNumber" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-md-3 control-label">套餐周期<i class="red">*</i></label>
                        <div class="input-group col-md-5" style="padding-left: 15px;">
                            <input class="form-control"  id="financialQuantity" oninput = "value=value.replace(/[^\d]/g,'')" type="number" value=""  name="financialQuantity" />
                        </div>
                    </div>
                    <input type="hidden" id="userId">
                    <div class="form-group">
                        <label for="dtp_input1" class="col-md-3 control-label">开始时间<i class="red">*</i></label>
                        <div class="input-group date form_datetime col-md-5" data-date="2000-11-01" data-date-format="yyyy-mm-dd hh:ii:ss" data-link-field="dtp_input1" style="padding-left: 15px;">
                            <input class="form-control" size="16" id="startDate" type="text" value="" readonly name="dateOfBirth" />
                        </div>
                        <input type="hidden" id="dtp_input1" value="" /><br/>
                    </div>
                    <div class="form-group" id="expirationDatebox" style="display: none;">
                        <label for="dtp_input2" class="col-md-3 control-label">结束时间<i class="red">*</i></label>
                        <div class="input-group col-md-5" style="padding-left: 15px;">
                            <input class="form-control"  id="expirationDate" type="text" value="" readonly name="dateOfBirth" />
                        </div>
                        <input type="hidden" id="dtp_input2" value="" /><br/>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="member-submit" data-loading-text="加载中...">提交更改</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->



<!--回到顶部--->
<a id="backTop">
    <i class="fa fa-angle-up"></i>
</a>

<script src="../lib/jquery/jquery.min.js" type="text/javascript"></script>
<script src="../lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../plugins/validator/js/bootstrapValidator.min.js"></script>
<script type="text/javascript" src="../lib/bootstrap/js/bootstrap-table.min.js"></script>
<script type="text/javascript" src="../lib/bootstrap/js/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="../js/sweetalert-dev.js"></script>
<script src="../plugins/validator/js/bootstrap-datetimepicker.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../plugins/validator/js/bootstrap-datetimepicker.zh-CN.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="../js/public.js"></script>
<script src="../js/desc.js"></script>

<script>
    $(function () {

        //1.初始化Table
        var oTable = new TableInit();
        oTable.Init();

        //2.初始化Button的点击事件
        var oButtonInit = new ButtonInit();
        oButtonInit.Init();

    });

    $("#btn_edit").click(function(){
        location.href='detailed.html';
    });

    function queryHandle() {
        $('#tb_departments').bootstrapTable('refresh');
    }

    var TableInit = function () {
        var oTableInit = new Object();
        //初始化Table
        oTableInit.Init = function () {
            $('#tb_departments').bootstrapTable({
                url: website + '/UserController/queryAll', //请求后台的URL（*）
                method: 'get', //请求方式（*）
                toolbar: '#toolbar', //工具按钮用哪个容器
                striped: true, //是否显示行间隔色
                cache: false, //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
                pagination: true, //是否显示分页（*）
                sortable: false, //是否启用排序
                sortOrder: "asc", //排序方式
                queryParams: oTableInit.queryParams, //传递参数（*）
                sidePagination: "server", //分页方式：client客户端分页，server服务端分页（*）
                pageNumber: 1, //初始化加载第一页，默认第一页
                pageSize: 10, //每页的记录行数（*）
                pageList: [10, 25, 50, 100], //可供选择的每页的行数（*）
                search: false, //是否显示表格搜索，此搜索是客户端搜索，不会进服务端，所以，个人感觉意义不大
                strictSearch: true,
                showColumns: true, //是否显示所有的列
                showRefresh: true, //是否显示刷新按钮
                minimumCountColumns: 2, //最少允许的列数
                clickToSelect: true, //是否启用点击选中行
//						height: , //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
                uniqueId: "ID", //每一行的唯一标识，一般为主键列
                //          showToggle:true,                    //是否显示详细视图和列表视图的切换按钮
                cardView: false, //是否显示详细视图
                detailView: false, //是否显示父子表
                queryParams: function (params) {
                    var temp = { //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
                        pageSize: params.limit, //页面大小
                        pageNumber: (params.offset / params.limit), //页码
                        userName: $("#userName").val(),
                        state: $("#state").val()
                    };
                    return temp;
                },
                columns: [{
                    checkbox: true
                }, {
                    field: 'userName',
                    title: '用户昵称'
                }, {
                    field: 'sex',
                    title: '性别',
                    formatter: function (value, row, index) {
                        if (row['sex'] == 0) {
                            return '';
                        }
                        if (row['sex'] == 1) {
                            return '男';
                        }
                        if (row['sex'] == 2) {
                            return '女';
                        }
                        return value;
                    }
                }, {
                    field: 'balance',
                    title: '阅读宝'
                }, {
                    field: 'commission',
                    title: '余额'
                }, {
                    field: 'account',
                    title: '手机号'
                }, {
                    field: 'country',
                    title: '国家'
                }, {
                    field: 'province',
                    title: '省份'
                }, {
                    field: 'city',
                    title: '城市'
                }, {
                    field: 'invitationCode',
                    title: '邀请码'
                }, {
                    field: 'member',
                    title: '是否是会员'
                }, {
                    field: 'mallGrade',
                    title: '商城会员等级',
                    formatter: function (value, row, index) {
                        if (row['mallGrade'] == ''||row['mallGrade'] == null) {
                            return '普通会员';
                        }
                        return value;
                    }
                }, {
                    field: 'time',
                    title: '加入时间'
                }, {
                    field: 'state',
                    title: '状态',
                    formatter: function (value, row, index) {
                        if (row['state'] == 0) {
                            return '删除';
                        }
                        if (row['state'] == 1) {
                            return '正常';
                        }
                        return value;
                    }
                }],
                onLoadSuccess: function () {
                },
                onLoadError: function () {
                    showTips("数据加载失败！");
                }

            });


            $(document).on('keydown', function (event) {
                // 键盘翻页事件
                var e = event || window.event || arguments.callee.caller.arguments[0];
                if (e && e.keyCode == 38 || e && e.keyCode == 37) {//上,左
                    // 上一页
                    $('.page-pre').click()
                }
                if (e && e.keyCode == 40 || e && e.keyCode == 39) {//下,右
                    // 下一页
                    $('.page-next').click()
                }

            })

        };

        //得到查询的参数
        oTableInit.queryParams = function (params) {
            var temp = { //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
                limit: params.limit, //页面大小
                offset: params.offset, //页码
                departmentname: $("#txt_search_departmentname").val(),
                statu: $("#txt_search_statu").val()
            };
            return temp;
        };

        return oTableInit;
    };

    var ButtonInit = function () {
        var oInit = new Object();
        var postdata = {};

        oInit.Init = function () {
            //初始化页面上面的按钮事件
        };

        return oInit;
    };


    /*套餐*/
    function member() {
        var obj = $('#tb_departments').bootstrapTable('getSelections');

        var sowingMapId = 0;
        if(obj.length == 1) {
            obj.forEach(function(one) {
                /*sowingMapId = one.sowingMapId;*/
                $("#userId").val(one.userId);
                $('#member-myModal').modal('show');
            });
        } else if(obj.length > 1) {
            swal({
                title: "请单独选择你要操作的类目",
                type: "warning"
            });
        } else if(obj.length < 1) {
            swal({
                title: "请选择你要操作的记录",
                type: "warning"
            });
        }

    };



    /*套餐开始时间事件*/
    $("#startDate").datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView:0,
        minuteStep:1,
        // startDate:new Date(),
        format: 'yyyy-mm-dd hh:ii:ss',
        forceParse: 0
    }).on('changeDate', function(event) {
        event.preventDefault();
        event.stopPropagation();
        var startTime = event.date;
        if ($("#startDate").val() == '' || $("#startDate").val() == null) {
            return;
        }else{
            $("#financialQuantity").attr('readonly',true);
            var financialQuantity=$("#financialQuantity").val();
            if(financialQuantity=='' || financialQuantity==null){
                swal({
                    title: "套餐周期不能为空",
                    type: "warning"
                },function () {
                    window.location.reload();
                });
                return;
            }
            var time = $("#startDate").val();
                arr=time.split(' ')
            var day = arr[0]
            var date = new Date(day);
            var startDate = new Date(day);
            startDate = +startDate + 1000*60*60*24*financialQuantity;
            startDate = new Date(startDate);
            var n=startDate.getFullYear();
            var y=(startDate.getMonth() + 1) < 10 ? '0' + (startDate.getMonth() + 1) : '' + (startDate.getMonth() + 1);
            var r=startDate.getDate()< 10 ? '0' + startDate.getDate() : '' + startDate.getDate();
            var s=startTime.getHours()< 10 ? '0' + startTime.getHours() : '' + startTime.getHours();
            var f=startTime.getMinutes()< 10 ? '0' + startTime.getMinutes() : '' + startTime.getMinutes();
            var m=startTime.getSeconds()< 10 ? '0' + startTime.getSeconds() : '' + startTime.getSeconds();

            $("#expirationDate").val(n+'-'+y+'-'+r+' '+s+':'+f+':'+m);

            $("#expirationDatebox").show();
        }

    });




    // console.log(startDate.getDate()< 10 ? '0' + startDate.getDate() : '' + startDate.getDate())
    /*if (nextStartDate > day) {
        console.log(nextStartDate)
    }else{
        console.log(nextStartDate)
    }*/



    /*套餐结束时间事件*/
    /*$("#expirationDate").datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        minView:0,
        minuteStep:1,
        /!*todayHighlight: 1,*!/
        startView: 2,
        format: 'yyyy-mm-dd hh:ii:ss',
        forceParse: 0
    }).on('changeDate', function(event) {
        event.preventDefault();
        event.stopPropagation();
        var endTime = event.date;
        $("#startDate").datetimepicker('setEndDate', endTime);
    });*/


    /*会员提交事件*/
    $("#member-submit").click(function() {
        /*开始时间*/
        var startDate = $("#startDate").val();
        /*结束时间*/
        var expirationDate = $("#expirationDate").val();
        // 套餐周期
        var financialQuantity = $("#financialQuantity").val();
        // 套餐数量
        var financingNumber=$("#financingNumber").val();
        var userId=$("#userId").val();


        if(startDate == '' || startDate == null) {
            swal({
                title: "请选择开始时间",
                type: "warning"
            });
            return;
        } else if(expirationDate == '' || expirationDate == null){
            swal({
                title: "请选择结束时间",
                type: "warning"
            });
            return;
        }else if(financialQuantity == '' || financialQuantity == null){
            swal({
                title: "套餐周期不能为空",
                type: "warning"
            });
            return;
        }else if(financingNumber == '' || financingNumber == null){
            swal({
                title: "套餐数量不能为空",
                type: "warning"
            });
            return;
        }else{
            $('#member-submit').button('loading');
            $.ajax({
                url:website+'/FinancingDetailedController/addFinancingDetailed',
                type:'post',
                data:{
                    'userId':userId,
                    'financingNumber':financingNumber,
                    'financialQuantity':financialQuantity,
                    'financingStartTime':startDate,
                    'financingEndTime':expirationDate
                },success:function (data) {
                    swal({
                        title: data.msg,
                        type: "success"
                    }, function() {
                        $('#member-submit').button('reset');
                        window.location.reload();
                        $('#member-myModal').modal('hide');

                    });
                }
            });


        }
    });


    function convertDateFromString(dateString) {
        if (dateString) {
            var arr1 = dateString.split(" ");
            var sdate = arr1[0].split('-');
            var date = new Date(sdate[0], sdate[1]-1, sdate[2]);
            return date;
        }
    }

    /*会员模态框关闭事件*/
    $('#member-myModal').on('hidden.bs.modal', function () {
        $("#startDate").val('');
        $("#expirationDate").val('');
        $("#userId").val('');
        $("#financingNumber").val('');
        $("#financialQuantity").attr('readonly',false);
        $("#financialQuantity").val('');
        $("#expirationDatebox").hide();
    });


    // 修改余额
    function deliverGoods() {
        var obj = $('#tb_departments').bootstrapTable('getSelections');
        if(obj.length == 1) {
            obj.forEach(function(one) {
                $("#deliveryStatus-id").val(one.userId);
                // $("#commission").val(one.commission);
                console.log(one);
                $('#deliveryStatus-myModal').modal('show');
            });
        } else if(obj.length > 1) {
            swal({
                title: "请单独选择你要充值余额的用户",
                type: "warning"
            });
        } else if(obj.length < 1) {
            swal({
                title: "请选择你要充值余额的用户",
                type: "warning"
            });
        }
    }

    function update() {

        var obj = $('#tb_departments').bootstrapTable('getSelections');
        var classificationId = 0;
        if(obj.length == 1) {
            obj.forEach(function(one) {
                classificationId = one.classificationId;
                location.href = "user-modifys.html?" + "id=" + one.userId;
            });
        } else if(obj.length > 1) {
            swal({
                title: "请单独选择你要查看的用户",
                type: "warning"
            });
        } else if(obj.length < 1) {
            swal({
                title: "请选择你要查看的用户",
                type: "warning"
            });
        }

    };

    /*修改余额*/
    $("#deliveryStatus-submit").click(function() {

        if($("input[type='radio']:checked").val()=="reduce"){

            // $("input[type='radio']:checked").val("-");
            // var reduce=$("input[type='radio']:checked").val("-");
            var reduce="-";                                         //如果选中为减少则赋值 "-" 号
            var deliveryStatus = $("#commission").val();            //获取用户输入的值
            var deliveryStatuss=reduce+deliveryStatus;              //将 "-" 与获取用户输入的值拼接
        }else if($("input[type='radio']:checked").val()=="add"){
            var deliveryStatuss = $("#commission").val();
        }


        var id = $("#deliveryStatus-id").val();
        // var deliveryStatus = $("#commission").val();

        // var isPay = $("#isPay").val();
        if(deliveryStatuss == '' || deliveryStatuss == null || deliveryStatuss == 0) {
            swal({
                title: "请输入充值金额",
                type: "warning"
            });
            return;
        } else {
            $.ajax({
                url: website+"/RechargeIsObviousController/directRelease",
                type: "post",
                data: {
                    userId: id,
                    number: deliveryStatuss
                },
                success: function (data) {
                    $("#deliveryStatus-submit").button('reset');
                    if (data.code == 200) {
                        //提交动作
                        swal({
                            title: "充值成功",
                            type: "success"
                        }, function() {
                            window.location.href = "member.html";
                        });
                    } else {
                        swal({
                            title: "充值失败",
                            type: "error"
                        }, function() {
                            window.location.href = "member.html";
                        });
                    }
                }
            })

        }
    });

    /*删除*/
    function deletes() {
        var obj = $('#tb_departments').bootstrapTable('getSelections');

        var sowingMapId = new Array();
        obj.forEach(function (one, i) {
            sowingMapId[i] = one.sowingMapId;
        });

        if (sowingMapId == 0) {
            swal({
                title: "请选择你要删除的记录",
                type: "warning"
            });
            return;
        }

        var msg = "确定删除选中数据？";
        if (confirm(msg) == true) {
            /* $.ajax({
                 url: "/SowingMapController/deletes",
                 type: "POST",
                 data: {'sowingMapId': sowingMapId},
                 success: function (data) {*/
            swal({
                title: '删除成功',
                type: "success"
            }, function () {
                window.location.reload();
            });
            /*}
            });*/
        } else {
            return false;
        }
    };


</script>
</body>

</html>